package midware

import (
	"github.com/gin-gonic/gin"
	"video/pkg"
)

func JwtParse() gin.HandlerFunc {
	return func(c *gin.Context) {
		get := c.GetHeader("token")
		userId, _ := pkg.GetToken(get)
		c.Set("userId", userId)
		c.Next()
	}
}
